package com.laborder.sysyy.dao;

import com.laborder.sysyy.entity.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
 /**
   * @function: 学生列表DAO层
   * @author: 759057893@qq.com lyz
   * @date: 2019/1/11 17:09
   */
@Repository
@Mapper
public interface StudentDaoMapper {

	 /**
	   * @function: 分页查询
	   * @author: 759057893@qq.com lyz
	   * @date: 2019/1/11 17:05
	   */
	List<Student> findStudentWithPage(Map<String, Object> map);
	 /**
	   * @function: 查询总数
	   * @author: 759057893@qq.com lyz
	   * @date: 2019/1/11 17:05
	   */
	int getStudentCount(Map<String, Object> map);
	 /**
	   * @function: 根据ID查询
	   * @author: 759057893@qq.com lyz
	   * @date: 2019/1/11 17:05
	   */
	Student getStudentInfo(int sId);
	 /**
	   * @function: 添加学生信息
	   * @author: 759057893@qq.com lyz
	   * @date: 2019/1/11 17:06
	   */
	int saveStudentInfo(Student student);
	 /**
	   * @function: 更新学生信息
	   * @author: 759057893@qq.com lyz
	   * @date: 2019/1/11 17:07
	   */
	int updateStudentInfo(Student student);

	 /**
	   * @function: 删除学生信息
	   * @author: 759057893@qq.com lyz
	   * @date: 2019/1/11 17:07
	   */
	int delStudentInfo(int sId);

	 /**
	   * @function: 批量删除学生信息
	   * @author: 759057893@qq.com lyz
	   * @date: 2019/1/11 17:07
	   */
	int delManyStudentInfo(int sId);

	 /**
	  * @function: 通过学生学号查重
	  * @author: 759057893@qq.com lyz
	  * @date: 2019/1/11 17:08
	  */
	Student getStudentInfoByName(@Param("sClassNum") String sClassNum);
	/**
	 * @function: 查询学生信息
	 * @author: 759057893@qq.com lyz
	 * @date: 2019/1/9 22:18
	 */
	List<Student> getAllStudent();

	/**
	 * @function: 根据Id查询学生信息
	 * @author: 759057893@qq.com lyz
	 * @date: 2019/1/10 14:39
	 */
	Student selectStudentById(int sId);

}
